package com.haoxuer.discover.team.data.entity;

import com.haoxuer.discover.data.annotations.FormAnnotation;
import com.haoxuer.discover.data.entity.AbstractEntity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.List;


@FormAnnotation(title = "团队", add = "添加团队", list = "任务团队", update = "更新团队")
@Entity
@Table(name = "bs_team")
public class Team extends AbstractEntity {

  /**
   * 团队介绍
   */
  private String name;

  /**
   * 团队logo
   */
  private String icon;


  /**
   * 团队描述
   */
  private String note;

  @OneToMany(fetch = FetchType.LAZY,mappedBy = "team")
  private List<TeamMember> members;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public List<TeamMember> getMembers() {
    return members;
  }

  public void setMembers(List<TeamMember> members) {
    this.members = members;
  }
}
